<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>API文档系统</title>
    <link href="__PUBLIC_PACK__/layui/css/layui.css?v={:config('api.version')}" rel="stylesheet"/>
    <link href="__MODULE_STATIC_THEME__/css/index.css?v={:config('api.version')}" rel="stylesheet"/>
</head>
<body>
<div class="header">
    <div class="wrap toolbar">
        <div class="title fl">API 文档开发手册</div>
        <ul class="member layui-nav fl">
            {php} $login = session('member');$redirect = urlencode((string)request()->domain().'/api/'); {/php}
            <li class="layui-nav-item layuihi-setting">
                {if isset($login) && isset($login['uid'])}
                <a href="javascript:;">{$login['nick']?:$login['account']}<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    <dd> <a href="/member/logout?from={$redirect}">退出</a> </dd>
                </dl>
                {else}
                <a href="javascript:;">会员<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    <dd> <a href="/member/login?from={$redirect}">登陆</a> </dd>
                    <dd> <a href="/member/regist?from={$redirect}">注册</a> </dd>
                </dl>
                {/if}
            </li>
        </ul>
    </div>
</div>
<div class="content">
    <ul>
        {foreach $apps as $v}
        <li>
            <a class="item" href="{:url('api/'.$v['name'].'/', [], false)}" target="_blank">
                <div class="box">
                    <div class="title">{$v['title']}</div>
                </div>
            </a>
        </li>
        {/foreach}
    </ul>
</div>
<script src="__PUBLIC_PACK__/jquery/jquery-3.4.1.min.js?v={:config('api.version')}"></script>
<script src="__PUBLIC_PACK__/layui/layui.js?v={:config('api.version')}"></script>
<script>
    layui.use('element', function(){
        var element = layui.element;
    });
</script>
</body>
</html>